package model;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Properties;

public class Shop {
	
	/**Properties file with basic shop values*/
	private Properties shopProperties = new Properties();

	/**Shop name*/
	private String name = "New Diner";
	
	/**Shop cash*/
	private double cash;
	
	/**ArrayList with products*/
	private ArrayList<Product> goodsList = new ArrayList<Product>();
	
	/**Selling price for Hamburger.*/
	private double burgerSellingPrice;
	
	/**Selling price for hotdogs.*/
	private double hotdogSellingPrice;
	
	/**Selling price for fries.*/
	private double friesSellingPrice;
	
	/**Selling price for softdrinks.*/
	private double softdrinkSellingPrice;
	
	/**Incoming cash for round*/
	private double roundIncomingCash=0;
	
	/**Outgoing cash for round*/
	private double roundOutgoingCash=0;
	
	public Shop() {
		try {
			shopProperties.load(new FileInputStream(new File("sources/properties/shop.properties")));
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
		} catch (IOException e) {
			// TODO Auto-generated catch block
		}
		this.cash =Double.parseDouble(shopProperties.getProperty("cash"));
		this.burgerSellingPrice=Double.parseDouble(shopProperties.getProperty("burgerSellingPrice"));
		this.hotdogSellingPrice=Double.parseDouble(shopProperties.getProperty("hotdogSellingPrice"));
		this.friesSellingPrice=Double.parseDouble(shopProperties.getProperty("friesSellingPrice"));
		this.softdrinkSellingPrice=Double.parseDouble(shopProperties.getProperty("softdrinkSellingPrice"));
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getCash() {
		return cash;
	}

	public void setCash(double cash) {
		this.cash = cash;
	}

	public ArrayList<Product> getGoodsList() {
		return goodsList;
	}

	public void setGoodsList(ArrayList<Product> goodsList) {
		this.goodsList = goodsList;
	}

	public double getBurgerSellingPrice() {
		return burgerSellingPrice;
	}

	public void setBurgerSellingPrice(double burgerSellingPrice) {
		this.burgerSellingPrice = burgerSellingPrice;
	}

	public double getHotdogSellingPrice() {
		return hotdogSellingPrice;
	}

	public void setHotdogSellingPrice(double hotdogSellingPrice) {
		this.hotdogSellingPrice = hotdogSellingPrice;
	}

	public double getFriesSellingPrice() {
		return friesSellingPrice;
	}

	public void setFriesSellingPrice(double friesSellingPrice) {
		this.friesSellingPrice = friesSellingPrice;
	}

	public double getSoftdrinkSellingPrice() {
		return softdrinkSellingPrice;
	}

	public void setSoftdrinkSellingPrice(double softdrinkSellingPrice) {
		this.softdrinkSellingPrice = softdrinkSellingPrice;
	}

	public double getRoundIncomingCash() {
		return roundIncomingCash;
	}

	public void setRoundIncomingCash(double roundIncomingCash) {
		this.roundIncomingCash = roundIncomingCash;
	}

	public double getRoundOutgoingCash() {
		return roundOutgoingCash;
	}

	public void setRoundOutgoingCash(double roundOutgoingCash) {
		this.roundOutgoingCash = roundOutgoingCash;
	}
}
